using BuildingBlocks.Core.Entities;

namespace Identity.Domain.Aggregates;

public class RolePermission
{
    public Guid RoleId { get; private set; } = default;
    public Guid PermissionId { get; private set; } = default;
    public Role? Role { get; private set; }  // 导航属性
    public Permission? Permission { get; private set; } // 导航属性

    private RolePermission() { }
    public RolePermission(Guid roleId, Role role, Guid permissionId, Permission permission)
    {

        RoleId = roleId;
        Role = role;
        PermissionId = permissionId;
        Permission = permission;

    }

}